package com.xgq.drink.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 商品评价表
 * </p>
 *
 * @author xgq
 * @since 2025-03-06
 */
@Getter
@Setter
@TableName("product_review")
public class ProductReview implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 评价ID
     */
    @TableId(value = "review_id", type = IdType.AUTO)
    private Long reviewId;

    /**
     * 商品ID
     */
    private Long productId;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 评分（1-5）
     */
    private Integer rating;

    /**
     * 评价内容
     */
    private String comment;
    private String url;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;

    /**
     * 评价状态
     */
    private Integer status;
    /**
     * 父ID 默认为0
     */
    private Long fatherId;
    @TableLogic(value = "0", delval = "1") // 逻辑删除字段
    private Integer isDeleted; // 逻辑删除字段
    @TableField(exist = false)
    private Long orderId;
}
